﻿using Caliburn.Micro;
using OPSYS_Schematic.BussinessLogic.EventMessage;
using OPSYS_Schematic.ShapeFoundation;
using OPSYS_Schematic.UIInfrastructure;
using WPFSchematics.Definition.Common;
using WPFSchematics.Extend;
using WPFSchematics.Extend.Tools;

namespace OPSYS_Schematic.BussinessLogic.MenuPart
{
    [MenuPart(BaseMenu = WorkbenchName.OperationPart, PreviousMenu = WorkbenchName.NodeCombiPart)]
    public class SpanPart : UIInfrastructure.MenuPart
    {
        public SpanPart() : base(WorkbenchName.SpanPart)
        {
        }

        public override void Execute()
        {
            //base.Execute();
            var _shapeOperation = IoC.GetInstance(typeof(IShapeOperation), OperateType.Span) as IShapeOperation;
            EventAggregator.Publish(new ShapeOperationMessage { ShapeOperation = _shapeOperation });
           
        }
    }
}